<template>
  <el-tooltip :content="title" placement="top-start">
    <el-button @click="handleBlur" v-bind="$attrs" v-on="$listeners"/>
  </el-tooltip>
</template>

<script type="text/ecmascript-6">

  export default {
    name: 'HintButton',
    props: {
      title: String
    },

    mounted () {
      // console.log('mounted()', this.$attrs)
      // console.log('mounted()', this.$listeners)
    },

    methods: {
      handleBlur (event) {
        // 让点击的按钮失去焦点
        // event.target.blur() // target发生事件的目标元素  ==> button/i
        event.currentTarget.blur() // currentTarget绑定监听的元素   ==> button
      }
    }
  }
</script>